module.exports = app => {
    const express = require('express');
    const router = express.Router();
    /**截断错误提示 */
    const assert = require('http-assert');
    /**公用类 */
    const utils = require('./../../plugin/utils');
    /**联表查询 $match 过滤id需要使用 mongoose.Types.ObjectId */
    const mongoose = require('mongoose');
    /**导入routes 模块*/
    require('./api/classify')(app, router, assert, utils, mongoose);//分类
    require('./api/note')(app, router, assert, utils);//笔记
    require('./api/test')(app, router, assert, utils);//测试功能

    /**app.use 统一管理路由 */
    app.use('/admin', router);//前端调用 http://localhost:3000/admin 
}